package com.xjoyt.pay.master.interfaces;

import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.dto.PageParam;
import com.xjoyt.pay.dto.PageResult;
import com.xjoyt.pay.master.params.ChannelPageParam;
import com.xjoyt.pay.master.po.Channel;

public interface ChannelContract {

	@RequestMapping("get/{id}")
	Channel get(@PathVariable("id") String id);

	@RequestMapping(value = "save", method = RequestMethod.POST)
	ExecuteResult<Channel> save(Channel param);

	@RequestMapping("remove/{id}")
	ExecuteResult<?> remove(@PathVariable("id") String id);

	@RequestMapping(value = "loadPage", method = RequestMethod.POST)
	PageResult<Channel> loadPage(PageParam<ChannelPageParam> param);

	// @RequestMapping("setEnabled/{id}/{enable}")
	// ExecuteResult<?> setEnabled(@PathVariable("id") String id,
	// @PathVariable("enable") boolean enable);

	/**
	 * 商户同步
	 * 
	 * @param ids
	 * @return
	 */
	@RequestMapping(value = "invokeRegisterChannel", method = RequestMethod.POST)
	ExecuteResult<?> invokeRegisterChannel(List<String> ids);

	@RequestMapping(value = "invokeRegisterChannelDiversity", method = RequestMethod.POST)
	ExecuteResult<?> invokeRegisterChannelDiversity(List<String> ids);

	@RequestMapping("findAllHealthEnabled/{enabled}")
	List<Channel> findAllHealthEnabled(@PathVariable("enabled") Boolean enabled);

	// @RequestMapping(value = "savePayChannel/{id}", method =
	// RequestMethod.POST)
	// ExecuteResult<PayChannel> savePayChannel(@PathVariable("id") String id,
	// PayChannel param);

	// @RequestMapping("removePayChannel/{id}")
	// ExecuteResult<?> removePayChannel(@PathVariable("id") String id);

	// @RequestMapping("setRegisterChannel/{id}/{requestId}")
	// ExecuteResult<?> setRegisterChannel(@PathVariable("id") String id,
	// @PathVariable("requestId") String requestId);

	// @RequestMapping("setPayChannel/{id}/{requestId}")
	// ExecuteResult<?> setPayChannel(@PathVariable("id") String id,
	// @PathVariable("requestId") String requestId);

}
